Literate Programming in Forth

نویسنده

  • Peter Knaggs
چکیده

We look at Donald Knuth's concept of \Literate Programming," investigating exactly what it is and how it is used to assist conventional programmers. We then ask what lessons we can learn from this idea and if it is possible to apply them to Forth. We look at the alterations needed to the system and/or Forth to allow us to take advantage of this system. Indeed do we obtain all of the advantages that Knuth claims. Finally some examples of Forth coding techniques are given allowing us to compare the more traditional techniques with Knuth's system. 1 What is Literate Programming Literate programming was created by Donald Knuth during the development of his TEX typesetting system. It is the combination of documentation and source together in a fashion suited for reading by human beings. In general, literate programs combine source and documentation in a single le, referred to as a WEB. Literate programming tools then parse the le to produce either readable documentation or compilable source. All the original work revolves around a particular literate programming tool called WEB. Knuth says [Knu92]: The philosophy behind WEB is that an experienced system programmer, who wants to provide the best possible documentation of his or her software products, needs two things simultaneously: a language like TEX for formatting, and a language like C for programming. Neither type of language can provide the best documentation by itself; but when both are appropriately combined, we obtain a system that is much more useful than either language separately. The structure of a software program may be thought of as a web that is made up of many interconnected pieces. To docu-

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Thirty Years of Literate Programming and More?

Don Knuth created Literate Programming about thirty years ago. It could be called a methodology, discipline, paradigm, . . . Bentley’s “Programming Pearls” article about Knuth’s book, TEX: The Program, caused a huge stir in the computing professions. Soon there was announcement of a Literate Programming section for the CACM . Several “Literate Programming systems” quickly appeared. This was fol...

متن کامل

An Elucidative Programming Environment for Scheme (Incomplete Draft)

In this paper we describe a programming environment for Scheme that supports elucidative programming. Scheme is a programming language in the Lisp family. Elucidative programming is a variant of literate programming. Literate programming represents the idea of structuring the program as fragments that are contained in an essay that documents the program understanding. Elucidative programming is...

متن کامل

AOPS: an abstraction-oriented programming system for literate programming

The practice of literate programming is not widespread because existing literate programming systems have some undesirable characteristics such as programming language and text processor dependence and lack of flexible tools for viewing and manipulation of the source file. This paper describes the literate programming system AOPS (Abstraction Oriented Programming System) which addresses both of...

متن کامل

A Literate Programming Tool for Concurrent Clean

Literate programming has attracted some interest in the functional programming community. This paper presents a prettyprinting algorithm used in a literate programming tool for the functional language Concurrent Clean, and discusses some of the issues involved in prettyprinting layout based languages. 1 Literate programming This section introduces the concept of literate programming for those w...

متن کامل

Literate Programming to Enhance Agile Methods

In this position paper, after explaining the essentials of literate programming, we argue that a literate programming style is consistent with the values espoused by agile software development; and that the application of literate programming in the context of an agile software development methodology is likely to enhance both the quality and lifespan of the final product.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1995